#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string s1, s2;
	cin >> s1 >> s2;

	int cnt1 = 0, cnt2 = 0;
	for (auto ii : s1) {
		if (ii == '1')
			cnt1++;
	}
	for (auto ii : s2) {
		if (ii == '1')
			cnt2++;
	}
	if (cnt1 % 2 != cnt2 % 2)
		cout << "impossible";
	return 0;
}
